package single;

public class Main {
    public static void main(String[] args) {
        for (int i = 0; i < 100; i++) {
            int finalI = i;
            new Thread(() -> {
                Connection singleton= ConnectUtil.getSingleton();
                System.out.println("线程：" + Thread.currentThread().getName() + "获得的连接：" + singleton.getConnectId());
            }, i + "").start();
        }
    }
}
